function saveMessagePOS(){
	var txtMessage = CKEDITOR.instances['txtMessage'].getData();
	var thxMessage = CKEDITOR.instances['thxmessage'].getData();
	var id = $("#idMessagePOS").val();
	var url = "/POSMessagesService";
	if($("#idMessagePOS").val() == null || $("#idMessagePOS").val() == ""){
		var func = "addMessagePOS";
	}else{
		var func = "editMessagePOS"
	}
	var data = { func : func,
			id : id,
			txtMessage : txtMessage,
			thxMessage : thxMessage
		}
	simpleservice(url,data,EditMessagePOS);
}

function EditMessagePOS(){
	var url = "/POSMessagesService";
	var func = "getMessagePOS"

	var data = { func : func
		}
	simpleservice(url,data,SetMessagePOS);
}

function SetMessagePOS(data){
	if(data != ""){
		var objArray = new Array();
		objArray = JSON.parse(data);
		var checkLogOut = "";
		if(objArray!=null){
			checkLogOut = checkSessionAdmin(objArray);
			if(checkLogOut)
				return;
			$("#idMessagePOS").val(objArray['id']);
			CKEDITOR.instances['txtMessage'].setData(objArray['message']);
			CKEDITOR.instances['thxmessage'].setData(objArray['thxmessage']);
		}
	}
}



function previewMessagesBill(){
	myWindow=window.open("/adminconsole/POSManager/POSBillMessage/PreviewBillMessages.jsp");
}